import {AddRouteRecordRaw} from '../index'
import Layout from '@/views/main.vue'

export default [
    {
        path: '/',
        component: Layout,
        name: 'main',
        meta: {
            title: '首页'
        },
        redirect: {path: '/index'},
        children: [
            {
                path: 'index',
                name: 'index',
                meta: {
                    title: '主页'
                },
                component: () => import('@/views/pages/index/index.vue')
            }
        ]
    },
    {
        path: '/user',
        component: Layout,
        redirect: {path: '/user/index'},
        children: [
            {
                path: 'index',
                name: 'user',
                meta: {
                    title: '后台用户管理'
                },
                component: () => import('@/views/pages/user/user.vue')
            },
            {
                path: 'uniApp',
                name: 'uniApp',
                meta: {
                    title: '小程序用户管理'
                },
                component: () => import('@/views/pages/user/uni-app-user.vue')
            }
        ]
    },
    {
        path: '/movie',
        component: Layout,
        redirect: {path: '/movie/admin'},
        children: [
            {
                path: 'admin',
                name: 'admin',
                meta: {
                    title: '电影管理'
                },
                component: () => import('@/views/pages/movie/admin/index.vue')
            },
            {
                path: 'cinema',
                name: 'cinema',
                meta: {
                    title: '影厅管理'
                },
                component: () => import('@/views/pages/movie/cinema/index.vue')
            },
            {
                path: 'order',
                name: 'order',
                meta: {
                    title: '订单管理'
                },
                component: () => import('@/views/pages/movie/order/index.vue')
            },
            {
                path: 'session',
                name: 'session',
                meta: {
                    title: '场次管理'
                },
                component: () => import('@/views/pages/movie/session/index.vue')
            },
            {
                path: 'type',
                name: 'type',
                meta: {
                    title: '类型管理'
                },
                component: () => import('@/views/pages/movie/type/index.vue')
            },
            {
                path: 'audit',
                name: 'audit',
                meta: {
                    title: '类型管理'
                },
                component: () => import('@/views/pages/movie/audit/index.vue')
            },
            {
                path: 'charge',
                name: 'charge',
                meta: {
                    title: '类型管理'
                },
                component: () => import('@/views/pages/movie/charge/index.vue')
            }
        ]
    },
    {
        path: '/sys',
        component: Layout,
        redirect: {path: '/sys/index'},
        children: [
            {
                path: 'index',
                name: 'uniAppIndex',
                meta: {
                    title: '首页管理'
                },
                component: () => import('@/views/pages/setting/uniAppIndex.vue')
            },
        ]
    }
] as AddRouteRecordRaw[]